package com.etoak.entity;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 购物车
 */
@Data
public class Cart {

    /* 菜品id */
    @NotNull(message = "菜品id不能为空")
    private Integer dishesId;

    /* 菜品名称 */
    @NotBlank(message = "菜品名称不能为空")
    private String dishesName;

    /* 菜品数量 */
    @NotNull(message = "菜品数量不能为空")
    @Min(value = 1, message = "最少为1")
    private Integer count;
}
